"""mmandtt URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from django_comments import urls  
from lblog import views as lblog_views
from django.conf.urls.static import static 
from django.conf import settings
from DjangoUeditor import urls as DjangoUeditor_urls


urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', 'lblog.views.index', name='index'),  
    url(r'^comments/', include('django_comments.urls')),
    url(r'^detail/$', lblog_views.blog_detail, name='blog_detail'),
    url(r'^ueditor/', include(DjangoUeditor_urls)),
    url(r'^about',lblog_views.blog_about, name='blog_about'),
    url(r'^contact',lblog_views.blog_contact, name='blog_contact'),
    url(r'^index', lblog_views.blog_list, name='blog_list'),

    url(r'^tags/(?P<tag_slug>[^/]+)/$', lblog_views.tag_detail, name='tag'),
    url(r'^blogs/(?P<article_slug>[^/]+)/$', lblog_views.article_detail, name='article'),
    url(r'^classifications/(?P<classification_slug>[^/]+)/$', lblog_views.classification_detail, name='classification'),
   
   
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)


if settings.DEBUG:
    urlpatterns += static(
        settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)





